<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vuev2.5.21.js"></script>
</head>
<body>
    <div id="app">
      <template id="tmp">
        <div>
          我是组件
        </div>
      </template>
      <template id="tmp1">
        <div>
          我是私有组件
        </div>
      </template>
    </div>
    <script>
      Vue.component('mycom',{template:"#tmp"})
      new Vue({
        el:"#app",
        data:{},
        methods:{},
        components:{
          login:{
            template:"#tmp1"
          }
        }
      })
    </script>
</body>
</html>